package com.foreknow.service;

import com.foreknow.entity.User;

public interface UserService {

    /**
     * 根据id删除
     * @param id
     * @return
     */
    int deleteByPrimaryKey(Integer id);


    /**
     * 添加
     * @param record
     * @return
     */
    int insert(User record);


    /**
     * 登录验证
     * @param loginUser
     * @return
     */
    User login(User loginUser);


    /**
     * 根据id查询
     * @param id
     * @return
     */
    User selectByPrimaryKey(Integer id);
    /**
     * 根据用户名查询用户
     * @param userName
     * @return
     */
    User selectByUserName(String userName);
    //修改

    /**
     * 根据record修改
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(User record);

    /**
     * 根据record修改
     * @param record
     * @return
     */
    int updateByPrimaryKey(User record);

}
